<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Email extends CI_Controller {
	
	public function emailtmep_c(){
		
		$tempname = $this->uri->segment(3);
		$tempinfo = $this->input->post('tempinfo');
		$temptitle = $this->input->post('temptitle');
		$this->load->model('email_model','em');
		//echo $tempname.'<br/>'.$tempinfo;exit;
		
		$q = $this->em->update_e_temp($tempname,$tempinfo,$temptitle);
		
		if($q){
			echo '<script>alert("update success!");window.location.href="http://houtai.com/sdksystem/emailtemplate"</script>';
		}else{
			echo '<script>alert("update fail!");window.location.href="http://houtai.com/sdksystem/emailtemplate"</script>';			
		}
		
	}
	
}